﻿@using ThuySan.Areas.Backend.Models
@model ThuySan.Models.CategoryModel
@{
    Layout = "~/Areas/Backend/Views/Shared/_Layout.cshtml";

    Header header = new Header {
                                       Common = "ViewUserControl_Category_Add",
                                       CurentCommon = "Category",
                                       PageHeader = "Add Category",
                                       Menulv1 = "01",
                                       Menulv2 = "0101"
                               };
    ViewData[Header.Key] = header;
    ViewBag.Title = "Add Category - Admin Control Panel";
    Html.EnableClientValidation();
}
<div class="content-box">
    <div class="content-box-header">
        <h3>
            Add Category</h3>
    </div>
    <div class="content-box-content">
        @using (Html.BeginForm("Add", "Category", FormMethod.Post, new {
                                                                               enctype = "multipart/form-data"
                                                                       }))
        {
            @Html.ValidationMessage("error")
            <div class="input-item">
                <label>
                    Name</label>
                @Html.TextBoxFor(c => c.Name, new {
                                                          @class = "text-input medium-input"
                                                  })
                @Html.ValidationMessageFor(c => c.Name)
            </div>
            <div class="input-item">
                <label>
                    Description</label>
                @Html.TextAreaFor(c => c.Description, new {
                                                          @class = "text-input large-input"
                                                  })
                @Html.ValidationMessageFor(c => c.Description)
            </div>
            <div class="input-item">
                <label>
                    Detail</label>
                @{
                    Html.Telerik().Editor().Name("Detail").Encode(false).HtmlAttributes(new {
                                                                                                    style = "height:400px"
                                                                                            }).Value(Model.Detail).Render();
                }
            </div>
            <div class="input-item">
                <label>
                    Priority</label>
                @Html.TextBoxFor(c => c.Priority, new {
                                                              @class = "text-input tiny-input"
                                                      })
                @Html.ValidationMessageFor(c => c.Priority)
            </div>
            <div class="input-item">
                <label>
                    Is Top Menu</label>
                @Html.CheckBoxFor(c => c.IsCategoryMenu)
            </div>
            <div class="title-seperator">
                Page Information</div>
            <div class="seperator">
            </div>
            <div class="input-item">
                <label>
                    Url</label>
                @Html.TextBoxFor(c => c.PageUrl, new {
                                                             @class = "text-input medium-input"
                                                     })
                @Html.ValidationMessageFor(c => c.PageUrl)
            </div>
            <input type="submit" value="Update" class="button" />
            <input type="reset" value="Reset" class="button" />
        }
    </div>
</div>